Add Legacy Cancellation Support and Fix Stripe Webhook Verification for App Router#162
Merged
Ashad001 merged 2 commits intoFireBird-Technologies:mainfrom Jun 24, 2025
Merged
Conversation
ArslanS1997
pushed a commit
that referenced
this pull request
Mar 17, 2026
Add Legacy Cancellation Support and Fix Stripe Webhook Verification for App Router
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for handling legacy users who do not have proper Stripe subscription IDs in the subscription cancellation flow. The changes ensure that legacy users are processed differently, bypassing Stripe API calls and updating Redis directly. Key updates include adjustments to logic for determining user type, handling credits, and updating subscription statuses.
Enhancements for Legacy User Handling:
isLegacyUserlogic to identify users without valid Stripe subscription IDs and adjusted the cancellation flow to skip Stripe API calls for these users. (auto-analyst-frontend/app/api/trial/cancel/route.ts: [1] [2] [3]auto-analyst-frontend/app/api/trial/cancel/route.ts: [1] [2];auto-analyst-frontend/app/api/user/cancel-subscription/route.ts: [3]Message and Status Updates:
auto-analyst-frontend/app/api/trial/cancel/route.ts: [1] [2];auto-analyst-frontend/app/api/user/cancel-subscription/route.ts: [3]auto-analyst-frontend/app/api/user/cancel-subscription/route.ts: auto-analyst-frontend/app/api/user/cancel-subscription/route.tsL34-R101)These changes ensure a smoother cancellation process for legacy users while maintaining proper handling for standard and trial users.